package net.zhengxinyun.performance.service.exam.exam;

import net.zhengxinyun.performance.entity.ExamQuestionEntity;
import net.zhengxinyun.performance.filter.ExamQuestionFilter;
import net.zhengxinyun.performance.mapper.exam.examQuestion.ExamQuestionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class ExamServiceImpl implements ExamService{


    @Autowired
    private ExamQuestionMapper mapper;
    @Override
    public List<ExamQuestionFilter> query(ExamQuestionFilter filter) {
        return mapper.query(filter);
    }

    @Override
    public int queryForCount(ExamQuestionFilter filter) {
        return mapper.queryForCount(filter);
    }

    @Override
    public int saveExam(ExamQuestionEntity entity) {
        return mapper.insert(entity);
    }

    @Override
    public int updateExam(ExamQuestionEntity entity) {
        return mapper.updateByPrimaryKeySelective(entity);
    }

    @Override
    public int insertLog(List list) {
        return mapper.insertLog(list);
    }

    @Override
    public int deleteByPrimaryKey(Long examId) {
        return mapper.deleteByPrimaryKey(examId);
    }

    @Override
    public List<ExamQuestionFilter> selectExam(ExamQuestionFilter filter) {
        return mapper.selectExam(filter);
    }

    @Override
    public int saveQuestionlist(List list) {
        return mapper.saveQuestionlist(list);
    }
}
